1. Field of the Invention
The present invention relates generally to a computer implemented method, data processing system, and computer program product for efficient use of volatile memory. More specifically, the present invention relates to maintaining an operating system (OS) free list of virtual memory pages.
2. Description of the Related Art
Designers of modern computers rely on two or more classes of workspace or addressing space (memory or storage). A first class of workspace is fast but relatively expensive. A second class of workspace is relatively slow, but cheaper than the first class of workspace. The first class of workspace can be volatile memory such as random access memory (RAM), while the second class of workspace can be a block storage device such as a disk drive. Frequently, there may be ten or more times as much of the second class of workspace available as compared to the first class in a typical computer system.
In order to operate efficiently, a system, as described above, moves instructions and data from the second class of workspace to the first class of workspace before a system processor operates on such instructions or data. A scheme to address memory within both classes of workspace is called virtual memory. Such an addressing scheme provides for a range of addresses larger than the addressable physical memory. Accordingly, a virtual memory ‘page’ can be actually stored to either physical memory or to storage, which correspond to the first class of workspace and the second class of workspace, respectively. Nevertheless, such virtual memory pages, if in the second class of workspace, must be marked as such, within a table, and then transferred to physical memory when accessed by the processor. The handling and manipulating of a virtual memory pages, a computer resource, is done through a virtual memory manager sub-component to a hypervisor. A hypervisor assigns resources to logical partitions.
Transferring data between storage and physical memory can be an expensive operation since the transfer is protracted, as compared to moving data between physical memories. Accordingly, benefits may be achieved if such transfers are minimized.
A virtual memory page is a fixed-size block of data. A virtual memory page can be resident in memory. Such a virtual memory page is mapped to a location where the physical data is stored in physical memory. Otherwise, a virtual memory page can be resident on a disk or other block device. In other words, the virtual memory page is paged out of physical memory, and instead, placed into paging space or a file system.
Accordingly, a virtual memory page can be an abstraction of memory storage that decouples the physical media from the operating characteristics of the virtual memory page as used within an operating system. Such physical media is where the virtual memory page resides. The physical media is any storage mechanism, for example, random access memory, disk storage, tape storage, flash memory, among others.
An application that requests an operating system to free a virtual memory page, typically runs a risk that such a virtual memory page is swapped to the slower of the two classes of workspace by the activity of a hypervisor, since a prior art operating system marks such a virtual memory page as unused. A hypervisor typically prioritizes for swapping such unused virtual memory pages to be displaced to swap space. Accordingly, some operating system marking of a virtual memory page as unused can be problematic.